package com.itcast.lsf.controller;

import com.itcast.lsf.domain.User;
import com.itcast.lsf.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class QuickController {
    @Autowired
    private UserMapper userMapper;
    @RequestMapping("/query")
    @ResponseBody
    public List<User> queryUserList(){
        List<User> user=userMapper.findAll();
        return user;
    }
}
